<%-- 
    Document   : despachador
    Created on : 20-feb-2012, 3:01:43
    Author     : Daniel
--%>

<%@page import="escom.ipn.modelo.delegate.catalogoIncidenteDelegate"%>
<%@page import="escom.ipn.modelo.dto.catalogoIncidenteClass"%>
<%@page import="escom.ipn.modelo.dto.Cat_Estados_Incidente"%>
<%@page import="escom.ipn.modelo.delegate.Cat_Estados_IncidenteDelegate"%>
<%@page import="java.util.logging.Logger"%>
<%@page import="java.util.logging.Level"%>
<%@page import="escom.ipn.modelo.delegate.IncidenteDelegate"%>
<%@page import="escom.ipn.modelo.dto.IncidenteClass"%>
<%@page import="escom.ipn.modelo.dto.UsuarioIncidente"%>
<%@page import="escom.ipn.modelo.delegate.UsuarioIncidenteDelegate"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.SQLException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href='http://fonts.googleapis.com/css?family=Electrolize' rel='stylesheet' type='text/css' />		
	<link rel="stylesheet" type="text/css" href="../css/demo.css" />
	<link rel="stylesheet" type="text/css" href="../css/despachador.css" />
        <link rel="stylesheet" type="text/css" href="../css/botones.css" />
        <link rel="stylesheet" type="text/css" href="../css/tablas.css" />
        <link rel="stylesheet" type="text/css" href="../css/jquery.alerts.css" />
        <link rel="stylesheet" type="text/css" href="../css/jquery.gritter.css" />
        <script type="text/javascript" src="http://www.google.com/jsapi?autoload=%7Bmodules%3A%5B%7Bname%3A%22maps%22%2Cversion%3A3%2Cother_params%3A%22sensor%3Dfalse%22%7D%5D%7D"></script>
        <script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="../js/jquery-ui-1.8.17.custom.min.js"></script>
        <script type="text/javascript" src="../js/Ajax.js"></script>
        <script type="text/javascript" src="../js/Despachador.js"></script>
        
        <script type="text/javascript" src="../js/jquery.alerts.js"></script>
        <script type="text/javascript" src="../js/jquery.gritter.js"></script>
        <script type="text/javascript" src="../js/utils.js"></script>
        <script type="text/javascript" src="../js/Map_general.js"></script>
        <script type="text/javascript" src="../js/Map_single.js"></script>
        <script type="text/javascript" src="../js/Calcula_Ruta.js"></script>
        <script type="text/javascript" src="../js/jquery.gritter.min.js"></script>

        <style type="text/css" title="currentStyle">
            @import "../js/media/css/demo_table.css";
            @import "../js/media/css/jquery.dataTables_themeroller.css";
        </style>
        <script type="text/javascript" language="javascript" src="../js/media/js/jquery.dataTables.js"></script> 
        <script type="text/javascript" src="../js/colorbox/jquery.colorbox.js"></script>
        
        <title>Despachador 066</title>

    </head>
    
    <body>
        <%
        HttpSession sess = request.getSession(true);
        if(sess.getAttribute("tipoUsuario").toString()!="Despachador"){
            if(sess.getAttribute("tipoUsuario").toString()=="Operador"){
                response.sendRedirect("../Operador/operador.jsp");
            }
            else if(sess.getAttribute("tipoUsuario").toString()=="Administrador"){
                response.sendRedirect("../Administrador/administrador.jsp");
            }
            else {
                response.sendRedirect("../login.jsp");
            }
        }
        %>
        <!-- Encabezado con Menú de navegación -->
                <div id="encabezado">
                    <!-- /navegacion -->
                    <img src="../img/ESCOMLogo.png" alt="imagen escom" width="114px" height="100px"/>
                    <img src="../img/IPNLogo.png" alt="imagen ipn" width="115px" height="100px"/>
                    <img src="../img/logo.JPG" alt="imagen 066" width="235px"/>
                    <ul id="navegacion" class="nav">
                        <li>
                            <a id="vinculoHome" 
                               href="#home" 
                               onClick="Logout()" 
                               value="Cerrar Sesion">
                                    <%=sess.getAttribute("tipoUsuario")%>
                                    <%=sess.getAttribute("Nombre")%>
                            </a>
                        </li>
                        <li>
                            <a id="vinculoMonitoreo" href="#monitoreo" onclick="MapaMonitoreoMostrar()"> Monitoreo</a>                   <!-- /navegacion -->
                            
                           

                        </li>
<%
                        UsuarioIncidenteDelegate delUI = new UsuarioIncidenteDelegate();
                        UsuarioIncidente UI = new UsuarioIncidente();
                        UI.setUsuarioId(Integer.parseInt(sess.getAttribute("id_Usuario").toString()));
                        List lista = delUI.mostrarUsuarioIncidente(UI);           
                        if(lista!=null){
                            for (int i = 0; i < lista.size(); i++) {
                                UsuarioIncidente listaIncidentes = (UsuarioIncidente) lista.get(i);
                                catalogoIncidenteClass ci = new catalogoIncidenteClass();
                                catalogoIncidenteDelegate cid = new catalogoIncidenteDelegate();
                                ci=cid.mostrarTipoIncidenteID(listaIncidentes.getIncidenteId());
%>
                                <li>
                                    <a id="vinculoIncidente<%=listaIncidentes.getIncidenteId()%>" 
                                       href="#incidente<%=listaIncidentes.getIncidenteId()%>"  
                                       onclick="PanelIncidente(<%=listaIncidentes.getIncidenteId()%>)"> 
                                       <%=ci.getIncidente() %> <%=listaIncidentes.getIncidenteId()%></a>
                                    
                                </li>
                                

<%
                            }
                            
                        }
                        
%>          
                   </ul><!-- /navegacion -->
                   
                   <input type="hidden" id="usuario" name="usuario" value="<%= sess.getAttribute("id_Usuario").toString() %>">
                    
		</div><!-- /encabezado --> 
                      
                <div id="respuesta"></div>
                
                <div id="mapaGeneral" class="contenidoSeccion" style="display: none">
                    <div class="informacion">
                        <div id="map_canvas" style="width:auto; height:700px"></div>
                    </div>
               </div>
                
                <div id="Alertas"       style="display: none"></div>
                <div id="Sugerencias"   style="display: none"></div>
                
	</body>
</html>
